'use client';

import { useContext } from "react";
import { Box } from "@chakra-ui/react";
import Battery from "./Battery";
import ConnectMode from "./ConnectMode";
import { MainContext } from "@/src/providers/MainProvider";

function DeviceInfo() {
    const {
        battery,
        connectMode,
        chargeFlag
    } = useContext(MainContext);

    return (
        <Box className="flex items-center gap-4">
            <Battery value={battery} charge_flag={chargeFlag} mode={connectMode} />
            <ConnectMode mode={connectMode} />
        </Box>
    );
}

export default DeviceInfo;